package com.house.health.service.impl;

import com.house.health.domain.Announcement;
import com.house.health.domain.Page;
import com.house.health.mapper.AnnouncementMapper;
import com.house.health.service.IAnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author DuanChangSuo
 * @date 2023/4/14 10:49
 * @description 类的描述和介绍
 **/
@Service
public class AnnouncementServiceImpl implements IAnnouncementService {
    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public int addNewAnnouncement(Announcement anno) {
        return announcementMapper.addAnnouncement(anno);
    }

    @Override
    public List<Announcement> findAllAnnouncement() {
        return announcementMapper.findAllAnnouncement();
    }

    @Override
    public Announcement findAnnouncementDetailById(int id) {
        return announcementMapper.findAnnouncementDetailById(id);
    }

    @Override
    public int updateAnnouncement(Announcement announcement) {
        return announcementMapper.updateAnnouncement(announcement);
    }

    @Override
    public int deleteAnnouncement(int aID) {
        return announcementMapper.deleteAnnouncement(aID);
    }
}
